package com.zhijian.medical.entity.vo.response;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 实验报告列表类
 *
 * @author HCG
 * @version 1.0
 * @date 2022/6/11
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Api(tags = "实验报告列表类")
public class ReportListVo implements Serializable {

    /**
     * 主键id
     */
    @ApiModelProperty("主键id")
    private Long id;

    /**
     * 患者姓名
     */
    @ApiModelProperty("患者姓名")
    private String name;

    /**
     * 病理号
     */
    @ApiModelProperty("病理号")
    private String blh;

    /**
     * 重写equals方法，只要id一样就认定是一个对象
     *
     * @param obj
     * @return
     */
    @Override
    public boolean equals(Object obj) {
        ReportListVo g = (ReportListVo) obj;
        return Objects.equals(this.getId(), g.getId());
    }

    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
}
